package com.cloud.api.domain.alarm;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.cloud.core.entity.base.BaseEntity;
import com.fasterxml.jackson.annotation.JsonIgnore;
import io.swagger.v3.oas.annotations.media.Schema;
import jakarta.validation.constraints.NotEmpty;
import jakarta.validation.constraints.NotNull;
import jakarta.validation.constraints.Size;
import lombok.Getter;
import lombok.Setter;
import lombok.experimental.Accessors;

import java.io.Serializable;

/**
 * <p>
 * 
 * </p>
 *
 * @author haohaibo
 * @since 2023-12-22
 */
@Getter
@Setter
@Accessors(chain = true)
@TableName("t_accident")
@Schema(name = "Accident", description = "事故管理")
public class Accident extends BaseEntity implements Serializable {

    private static final long serialVersionUID = 1L;

    @Schema(description = "主键")
    @TableId("id")
    private String id;

    @JsonIgnore
    @TableField(exist = false)
    private String vehicleType;

    @Schema(description = "车牌号")
    @TableField("car_number")
    @Size(min = 7,max = 8, message = "{validation.common.size}")
    private String carNumber;

    @Schema(description = "vin")
    @TableField("vin")
    @NotEmpty(message = "{validation.Information.vin}")
    @Size(min = 17,max = 17, message = "{validation.Information.vinSize}")
    private String vin;

    @Schema(description = "省")
    @TableField("province")
    @NotEmpty(message = "{validation.common.province}")
    private String province;

    @Schema(description = "市")
    @TableField("city")
    @NotEmpty(message = "{validation.common.city}")
    private String city;

    @Schema(description = "区")
    @TableField("district")
    @NotEmpty(message = "{validation.common.district}")
    private String district;

    @Schema(description = "详细地址")
    @TableField("detail_addr")
    @Size(min = 5,max = 50, message = "{validation.common.size}")
    private String detailAddr;

    @Schema(description = "组织机构id")
    @TableField("dept_id")
    private String deptId;

    @Schema(description = "组织机构名称")
    @TableField(exist = false)
    private String deptName;

    @Schema(description = "电池容量")
    @TableField("battery_capacity")
    @NotEmpty(message = "{validation.accident.batteryCapacity}")
    @Size(max = 7, message = "{validation.common.maxSize}")
    private String batteryCapacity;

    @Schema(description = "起火时车辆状态")
    @TableField("fire_vehicle_status")
    @NotNull(message = "{validation.accident.fireVehicleStatus}")
    private Integer fireVehicleStatus;

    @Schema(description = "储能装置电池包（箱）型号")
    @TableField("energy_storage_battery_model")
    @Size(max = 50, message = "{validation.common.maxSize}")
    @NotEmpty(message = "{validation.accident.energyStorageBatteryModel}")
    private String energyStorageBatteryModel;

    @Schema(description = "储能装置电池包（箱）生产企业")
    @TableField("energy_storage_battery_producer")
    @Size(max = 50, message = "{validation.common.maxSize}")
    @NotEmpty(message = "{validation.accident.energyStorageBatteryProducer}")
    private String energyStorageBatteryProducer;

    @Schema(description = "常用充电方式")
    @TableField("common_charge_methods")
    private Integer commonChargeMethods;

    @Schema(description = "最后一次充电方式")
    @TableField("last_charge_methods")
    private Integer lastChargeMethods;

    @Schema(description = "事故发生时车辆SOC")
    @TableField("accident_vehicle_soc")
    @Size(min = 1,max = 30, message = "{validation.common.size}")
    @NotEmpty(message = "{validation.accident.accidentVehicleSoc}")
    private String accidentVehicleSoc;

    @Schema(description = " 电池单体型号")
    @TableField("battery_monomer_model")
    @Size(min = 1,max = 30, message = "{validation.common.size}")
    @NotEmpty(message = "{validation.accident.batteryMonomerModel}")
    private String batteryMonomerModel;

    @Schema(description = "电池单体生产企业")
    @TableField("battery_monomer_producer")
    @Size(min = 1,max = 30, message = "{validation.common.size}")
    @NotEmpty(message = "{validation.accident.batteryMonomerProducer}")
    private String batteryMonomerProducer;

    @Schema(description = "事故车里程")
    @TableField("accident_mileage")
    @Size(min = 1,max = 7, message = "{validation.common.size}")
    @NotEmpty(message = "{validation.accident.accidentMileage}")
    private String accidentMileage;

    @Schema(description = "事故调查后问题单体号")
    @TableField("accident_investigation_problem_num")
    @Size(min = 1,max = 100, message = "{validation.common.size}")
    private String accidentInvestigationProblemNum;

    @Schema(description = "故障情况")
    @TableField("fault_conditions")
    @Size(min = 1,max = 100, message = "{validation.common.size}")
    private String faultConditions;

    @Schema(description = "事故表征")
    @TableField("accident_characterization")
    @Size(min = 1,max = 100, message = "{validation.common.size}")
    private String accidentCharacterization;

    @Schema(description = "事故影响")
    @TableField("accident_impact")
    @Size(min = 1,max = 100, message = "{validation.common.size}")
    private String accidentImpact;

    @Schema(description = "事故原因初判")
    @TableField("initial_accident_cause")
    @Size(min = 1,max = 100, message = "{validation.common.size}")
    private String initialAccidentCause;

    @Schema(description = "现场照片")
    @TableField("scene_photos_url")
    private String scenePhotosUrl;

}
